package com.niu.utils;

import java.util.Map;

/**
 * @Author 鹅鹅鹅
 * @Version 1.0.0
 * @Date 2025/7/18 12:05
 * @Description 该工具使用ThreadLocal 对象存储数据
 */
public class MyThreadLocalUtils {

    private static ThreadLocal<Map<String, Object>> local = new ThreadLocal<>();

    // 存放数据
    public static void setValue(Map<String, Object> map){
        local.set(map);
    }

    // 获取数据
    public static Map<String, Object> getValue(){
        return local.get();
    }

}
